<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
     <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>预定处理</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    
    <link rel="stylesheet" href="${pageContext.request.contextPath }/dist/css/bootstrap.min.css" type="text/css"></link>
    <link rel="stylesheet" href="${pageContext.request.contextPath }/assets/css/ie10-viewport-bug-workaround.css" type="text/css"></link>
    <link rel="stylesheet" href="${pageContext.request.contextPath }/assets/css/justified-nav.css" type="text/css"></link>
    <script type="text/javascript" src="${pageContext.request.contextPath }/assets/js/ie-emulation-modes-warning.js"></script>
    
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/css/jquery.pagination.css" />
    <script type="text/javascript" src="${pageContext.request.contextPath }/js/jquery.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath }/js/jquery.pagination.min.js"></script>
    <style type="text/css">
        body {
            padding-bottom: 40px;
        }
        .sidebar-nav {
            padding: 9px 0;
        }
        @media (max-width: 980px) {
            .navbar-text.pull-right {
                float: none;
                padding-left: 5px;
                padding-right: 5px;
            }
        }
    </style>
</head>
<body>

<div class="container">
      <div class="masthead">
        <h3 class="text-muted">智能图书管理系统</h3>
        <nav>
          <ul class="nav nav-justified">
            <li><a href="<%=request.getContextPath()%>/admin/show">借书处理</a></li>
            <li ><a href="<%=request.getContextPath()%>/admin/backBooks">归还处理</a></li>
            <li class="active"><a href="<%=request.getContextPath()%>/admin/showReserveBook">预定处理</a></li>
            <li><a href="<%=request.getContextPath()%>/admin/showSuggestBuy">建购处理</a></li>
            <li><a href="<%=request.getContextPath()%>/admin/showUsers">查询用户信息</a></li>
            <li><a href="<%=request.getContextPath()%>/quit">退出登录</a></li>
          </ul>
        </nav>
      </div>
      <br><br>
         
<table class="table table-bordered table-hover definewidth m10">

    <thead>
    <tr>
    		<th>申请人</th>
        <th>书籍名称</th>
        <th>作者</th>
        <th>出版社</th>
        <th>版本</th>
        <th>申请时间</th>
       	<th>操作</th>
    </tr>
    </thead>
    <c:forEach items="${allReserves }" var="allReserve">
    	<tr>
    		<td>${allReserve.uname}</td>
            <td>${allReserve.bname}</td>
            <td>${allReserve.author}</td>
            <td>${allReserve.birth}</td>
            <td>${allReserve.edition}</td>
             <td><fmt:formatDate  value="${allReserve.startTime}" type="time" pattern="yyyy-MM-dd HH:mm:ss"/></td>
            <td>
            	<c:if test="${allReserve.number<=0}">
            		<a type="button" class="btn btn-success" href="<%=request.getContextPath()%>/admin/allowReserveBook?id=${allReserve.id}">同意预定</a>
            	</c:if>
            	<a type="button" class="btn btn-danger" href="<%=request.getContextPath()%>/admin/notAllowReserveBook?id=${allReserve.id}">不同意预定</a>
            </td>
        </tr>	
    </c:forEach>
</table>
      
      
      
      
</div>











   


</body>
</html>